package org.jinion.result;

import java.util.LinkedList;

import org.jinion.result.table.AbstractTable;

/**
 * This is the abstract object wrapping database execution result.
 * @author zhlmmc
 *
 */
public abstract class AbstractResult {
	protected int affectedRows;
	protected AbstractTable table;
	protected LinkedList generatedKeys;
	
	public AbstractResult(){
		this.affectedRows = -1;
		table = null;
		generatedKeys = null;
	}

	public void setAffectedRows(int affectedRows) {
		this.affectedRows = affectedRows;
	}

	public void setTable(AbstractTable table) {
		this.table = table;
	}

	public void setGeneratedKeys(LinkedList generatedKeys) {
		this.generatedKeys = generatedKeys;
	}

	public int getAffectedRows() {
		return affectedRows;
	}

	public AbstractTable getTable() {
		return table;
	}

	public LinkedList getGeneratedKeys() {
		return generatedKeys;
	}
}
